package com.zw.april14thh.ex;

import com.zw.april14thh.vo.AjaxResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobleExhandle {

    @ExceptionHandler(Exception.class)
    public AjaxResult handlerException(Exception e){
        return AjaxResult.error(e.getMessage());
    }

}
